package com.sw.bbs.common.vo;

import lombok.Data;

/**
 * RestResponse
 *
 * @author Johnathan
 */
@Data
public class RestResponse<T> {

    /**
     * 错误码
     */
    private String errorCode = "0";

    /**
     * 错误信息
     */
    private String errorMsg = "";

    /**
     * 数据
     */
    private T data;

    public RestResponse() {
    }

    public RestResponse(String errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public RestResponse(T data) {
        this.data = data;
    }
}
